package com.tom.web.controller;

import com.tom.dto.SMSRegisterDto;
import com.tom.service.IVipUserService;
import com.tom.service.impl.VipUserServiceImpl;
import com.tom.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IVipUserService vipUserService;

    /**
     * 手机号注册的方法
     * @param dto
     * @return
     */
    @RequestMapping(value = "/register", method = RequestMethod.POST)
    public AjaxResult SMSregister(@RequestBody SMSRegisterDto dto){
        vipUserService.SMSRegister(dto);
        return AjaxResult.me();
    }
}
